resize

abstract fun resize(size: Size)

Updates size of the current browser instance with the given one. By default, the size of the browser is empty. Many web pages rely on the browser size and require that it is not empty. The DOM document of a web page might not be loaded and displayed at all, because there is no sense in loading and rendering DOM document when it is empty.

Use this method when you do not need to display content of the loaded web page, but the web page must "think" it has been loaded in a browser instance with a non-empty size.

Parameters

size

a new size in the logical pixels

Throws

when size is empty

when the browser is already closed


abstract fun resize(width: Int, height: Int)

Updates size of this Browser instance with the given width and height. By default, Browser's size is empty. Many web pages rely on the Browser's size and require that it is not empty. DOM document of a web page might not be loaded and displayed at all, because there is no sense in loading and rendering DOM document when it is empty.

Use this method when you do not need to display content of the loaded web page, but the web page must "think" it has been loaded in a Browser instance with non-empty size.

Parameters

width

the specified width in the logical pixels

height

the specified height in the logical pixels

Throws

when width or height is not positive

when this Browser is already closed